package org.example;

import org.example.maibobo.processor.MaiboboMessageProcessor;
import org.smartboot.socket.transport.AioQuickServer;

import java.io.IOException;

public class Main {
    public static void main(String[] args) throws IOException {
        AioQuickServer server = new AioQuickServer(20211, (readBuffer, aioSession) -> {
            byte[] b = new byte[readBuffer.remaining()];
            readBuffer.get(b);
            return b;
        }, new MaiboboMessageProcessor());
        server.start();
    }
}